#include "knight.h"

#include <QList>

Knight::Knight(Cell *cell, QString color, QWidget *parent): Piece(cell, color, parent){
    loadPieceImage(color + "knight");
    cell->setPiece(this);
}

QList<Cell *> Knight::getTips(Board *board)
{
    QList<Cell *> tips;
    tips << isMove(2, 1, board);
    tips << isMove(2, -1, board);
    tips << isMove(-2, 1, board);
    tips << isMove(-2, -1, board);
    tips << isMove(1, 2, board);
    tips << isMove(-1, 2, board);
    tips << isMove(1, -2, board);
    tips << isMove(-1, -2, board);
    return tips;
}
